/**
 * Created by Administrator on 2017/1/13.
 */
function styleHeaderSiblings() {
    var support = document.getElementsByTagName;
    if (!support) {
        return false;
    }

    var headers = document.getElementsByTagName('h1');
    var elem;
    for (var i = 0; i < headers.length; i++) {
        elem = getNextElement(headers[i].nextSibling);
        addClass(elem, 'intro');
    }

    function getNextElement(node) {
        if (node.nodeType == 1) {
            return node;
        }
        if (node.nextSibling) {
            return getNextElement(node.nextSibling)
        }
        return null;
    }
}

addLoadEvent(styleHeaderSiblings);